/**
 * @returns {boolean}
 */
function validate_required(field,alerttxt)
{
    with (field)
    {
        if (value==null||value==="")
        {alert(alerttxt);return false}
        else {return true}
    }
}

/**
 * 表单验证
 * @returns {boolean}
 */
function validate_form(thisform)
{
    with (thisform)
    {
        if (validate_required(support,"请输入")===false)
        {username.focus();return false}
        if (validate_required(confidence,"请输入")===false)
        {password.focus();return false}
    }
}

